package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 采购车实体类
 */
@Data
@ApiModel(value = "采购车实体")
@TableName("t_buycar")
public class BuyCarBean {
    /**采购车id*/
    @TableId(value = "pk_buyCarId", type = IdType.AUTO)
    private Integer buyCatId;
    /**采购数量*/
    @ApiModelProperty(value = "采购数量")
    @TableField("b_num")
    private Integer num;
    /**采购价*/
    @ApiModelProperty(value = "采购价")
    @TableField("b_price")
    private Integer price;
    /**库存商品外键*/
    @TableField("fk_productId")
    private String productId;
    /**登录用户外键*/
    @TableField("fk_userId")
    private Integer userId;
    /**库存商品对象*/
    @TableField(exist = false)
    private ProductBean productBeanInBuyCar;
    /**采购员编号（登录用户）*/
    @TableField(exist = false)
    private UserBean userBeanInBuyCar;

    public BuyCarBean() {
    }

    public BuyCarBean(Integer num, String productId, Integer userId) {
        this.num = num;
        this.productId = productId;
        this.userId = userId;
    }

    public BuyCarBean(Integer num, Integer price, String productId, Integer userId) {
        this.num = num;
        this.price = price;
        this.productId = productId;
        this.userId = userId;
    }

    public Integer getBuyCatId() {
        return buyCatId;
    }

    public void setBuyCatId(Integer buyCatId) {
        this.buyCatId = buyCatId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public ProductBean getProductBeanInBuyCar() {
        return productBeanInBuyCar;
    }

    public void setProductBeanInBuyCar(ProductBean productBeanInBuyCar) {
        this.productBeanInBuyCar = productBeanInBuyCar;
    }

    public UserBean getUserBeanInBuyCar() {
        return userBeanInBuyCar;
    }

    public void setUserBeanInBuyCar(UserBean userBeanInBuyCar) {
        this.userBeanInBuyCar = userBeanInBuyCar;
    }

    @Override
    public String toString() {
        return "BuyCarBean{" +
                "buyCatId=" + buyCatId +
                ", num=" + num +
                ", price=" + price +
                ", productId=" + productId +
                ", userId=" + userId +
                ", productBeanInBuyCar=" + productBeanInBuyCar +
                ", userBeanInBuyCar=" + userBeanInBuyCar +
                "}\n";
    }
}
